package com.zwj.service;

import com.zwj.vo.Result;
import org.springframework.core.io.Resource;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;

public interface FileService {

    Result upload(MultipartFile file);

    void download(String fileName, HttpServletResponse response);

    Result uploadFile(MultipartFile file);

    ResponseEntity<Resource> downloadFile(String fileName, HttpServletRequest request) throws UnsupportedEncodingException;

    Result uploadImage(MultipartFile file);
}
